package jhunter.dao.condition;

import java.util.ArrayList;
import java.util.List;

import jhunter.dao.EntityExt;

public class NullPropertyCondition implements Condition {

	private EntityExt entity;

	private String propertyName;
	
	public NullPropertyCondition(EntityExt entity, String propertyName) {
		this.entity = entity;
		this.propertyName = propertyName;
	}
	
	@Override
	public String getWhereSql() {
		return entity.getTableAlias() + "." + entity.getColumnName(propertyName) + " is null ";
	}

	@Override
	public List<Object> getParameters() {
		return new ArrayList<Object>();
	}

	@Override
	public boolean isEmpty() {
		// TODO Auto-generated method stub
		return false;
	}

}
